//
//  FeedbackShopNameView.m
//  WeiYiMei
//
//  Created by 李叶夫 on 2019/6/11.
//  Copyright © 2019年 liyefu. All rights reserved.
//

#import "FeedbackShopNameView.h"

@interface FeedbackShopNameView ()

@property (nonatomic, strong) UILabel *titleLab;
@property (nonatomic, strong) UITextField *textField;

@end

@implementation FeedbackShopNameView

- (NSString *)name
{
    return self.textField.text;
}

- (void)setupSubViews
{
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.textColor = kColor333333;
    self.titleLab.font = [UIFont systemFontOfSize:15];
    self.titleLab.text = @"商户名称";
    [self addSubview:self.titleLab];
    
    self.textField = [[UITextField alloc] init];
    self.textField.textColor = kColor333333;
    self.textField.font = [UIFont systemFontOfSize:15];
    self.textField.placeholder = @"请输入商户名称";
    [self addSubview:self.textField];
}

- (void)setupConstraints
{
    [self.titleLab setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.equalTo(self).offset(16);
    }];
    
    [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.top.bottom.equalTo(self);
        make.left.equalTo(self.titleLab.mas_right).offset(10);
        make.right.equalTo(self).offset(-16);
    }];
}

@end
